<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //获取用户的输入
    let week = prompt('请输入的你的数字');

    //类型转换
    let w = Number(week);

    //判断
    switch (w) {
      //快捷键进行代码格式化 alt + shift + f
      case 1:
        alert('星期一');
        break;
      case 2:
        alert('星期二');
        break;
      case 3:
        alert('星期三');
        break;
      case 4:
        alert('星期四');
        break;
      case 5:
        alert('星期五');
        break;
      case 6:
      case 7:
        alert('周末');
        break;
      //其他情况
      default:
        alert('你是来自于外星么??');
    }

  </script>
</body>

</html>